package com.gulimall.product.feign;

import com.gulimall.common.to.SkuReductionTo;
import com.gulimall.common.to.SpuBoundsTo;
import com.gulimall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author by董江
 * @Tool Intellij IDEA
 * @Classname CouponFeignService
 * @Date 2022/5/3 16:45
 */
@FeignClient(value = "gulimall-coupon",path = "/coupon")
public interface CouponFeignService {

    /**
     * 商品积分的远程调用接口  使用To传输数据 -> SpuBoundsController
     * @param spuBounds
     * @return
     */
    @PostMapping("/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundsTo spuBounds);

    /**
     * 优惠信息保存 -> SkuFullReductionController
     * @param skuReductionTo
     * @return
     */
    @PostMapping("/skufullreduction/saveinfo")
    R saveSkuReduction(SkuReductionTo skuReductionTo);
}
